{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "TableDisplay.loadingMode = \"ALL\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from  beakerx import *\n",
    "TableDisplay.loadingMode =\"ENDLESS\"\n",
    "rowList = []\n",
    "for row in range(10000):\n",
    "    colMap = {}\n",
    "    for col in range(2):\n",
    "      index = col+1\n",
    "      key =  \"a\" + str(index)\n",
    "      colMap[key] = row * index\n",
    "    rowList.append(colMap)\n",
    "\n",
    "td = TableDisplay(rowList)\n",
    "\n",
    "def color_provider(r1, column, td):\n",
    "    r2 = td.values[r1]\n",
    "    val = r2[column]\n",
    "    if val % 2 is 0:\n",
    "        return Color.GREEN    \n",
    "    return Color.BLACK    \n",
    "\n",
    "td.setFontColorProvider(color_provider)\n",
    "td"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from  beakerx import *\n",
    "rowList = []\n",
    "for row in range(10000):\n",
    "    colMap = {}\n",
    "    for col in range(2):\n",
    "      index = col+1\n",
    "      key =  \"a\" + str(index)\n",
    "      colMap[key] = row * index\n",
    "    rowList.append(colMap)\n",
    "\n",
    "td = TableDisplay(rowList)\n",
    "\n",
    "def color_provider(r1, column, td):\n",
    "    r2 = td.values[r1]\n",
    "    val = r2[column]\n",
    "    if val % 2 is 0:\n",
    "        return Color.GREEN    \n",
    "    return Color.BLACK    \n",
    "\n",
    "td.setFontColorProvider(color_provider)\n",
    "td"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "def color_provider(r1, column, td):\n",
    "    r2 = td.values[r1]\n",
    "    val = r2[column]\n",
    "    if val % 3 is 0:\n",
    "        return Color.GREEN    \n",
    "    return Color.BLACK    \n",
    "\n",
    "td.setFontColorProvider(color_provider)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": false,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": false,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
